CS 111: Test 2 info

Table of Contents

Notes sheet

You are permitted one 8.5 x 11 handwritten notes sheet (both sides) for use as a reference during the exam.

How to study

Lots of research has shown that reading over material is only a starting point for preparing for exams. It’s not sufficient. The critical thing to do is to practice. Reading how to swing a baseball bat or how to cross-country ski might give you some good ideas on how to get better the next time you try it, but it’s not even close to just getting out there and swinging a bat or skiing in the Arb.

How can you practice? One thing you can do is try the exercises at the end of each chapter, for which the solutions are available online. Practice these under test conditions and see how you do. You can also work again through all of the CodeCheck exercises, which are also likely great examples on how to practice.

Make sure to do all of your practicing on paper, not at a keyboard, so as to simulate the exam conditions.

Exam content

Listed below is the material that I have in mind that you should know for the exam. It’s what’s in my head when creating it. That said, this isn’t a contract. I may have inadvertently left something off this list that ends up on an exam question. I make no guarantees that the exam will be 100% limited to items listed below. Moreover, I may not be able to test all of this material given the time limitations of the exam. I may have to pick and choose some subset of it.

Exam format

The questions will vary, but might consist of things like:

  • multiple choice
  • fill in the blank
  • write portions of Python code to accomplish tasks
  • write a sentence or two explaining something
  • other possibilities, but hopefully you get the idea

Ultimately, the content that I will be drawing from for the exam is material that we have talked about in class, and material that you have used in CodeCheck labs and on assignments, but also ideas that we have discussed in class. The textbook does have a variety of things mentioned in passing that are worth knowing, but if we haven’t discussed it in class and/or if it hasn’t been part of a lab or an assignment, I won’t test on it.

Learning goals

Students should be able to…

Demonstrate ability to interpret and utilize loops (“while”, “for”). Can interpret and construct code that does repetitive tasks, including nested loops.

Demonstrate ability to interpret and utilize conditional statements work (“if”). Can interpret and construct complex conditions involving and, or, not, ==, <, <=, >, >=. Can evaluate Boolean expressions to get appropriate answer (True or False). Demonstrate understanding of differences between = and ==. Can construct and/or interpret complex usages of “if”, “elif”, and “else”, including nesting.

Be able to write a function to perform a specified task. Be able to correctly predict results from a program that utilizes functions, parameters, and local variables. Be able to appropriately handle use return statements and return values. Be able to distinguish when changing a parameter inside of a function has effects outside of that function.

Be able to write code to do image processing, similar to the examples we did for the assignments. My goal is not to test detailed memorization of the images library, but rather the ability to use it to do interesting things. Students should already know how to the tasks we’ve done repeatedly such as reading an image from a file, reading pixels, modifying pixels, etc., but I will provide copies of the appropriate portions of the images.py documentation (currently linked on Moodle) that are relevant.

Be able to define and distinguish among classes, objects, functions, methods, instance variables, local variables, and parameters.

Continue to be able to use important programming skills from the first third of the course, such as arithmetic, strings, input/output, and so on. Exam questions won’t be written with the explicit purpose of testing these items, but could easily include them as part of a problem designed to test a more recent idea.